Skip to content

Conversation

@vchuravy
Copy link
Member

@vchuravy vchuravy commented Feb 13, 2023

Depends on JuliaGPU/KernelAbstractions.jl#317

Can happen last as long as we decide where backend lives.

Copy link
Contributor

@leios leios left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Working on this PR (finally). Can we also just remove indexing.jl and synchronization.jl for KA's utilities?


abstract type AbstractGPUBackend end

abstract type AbstractKernelContext end
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the intention to remove AbstractKernelContext completely?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I think so. It shouldn't be needed anymore.

error("Not implemented") # COV_EXCL_LINE
# TODO:
# - Rename KA device to backend
# - Who owns `AbstractGPUBackend`?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right now, AbstractGPUBackend is only used in the JLArrays lib, but can't we work towards deprecating that lib with KA's CPU capabilities?

If so, why do we need AbstractGPUBackend? Can't we just use KA's Backend?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need a JLArrays implementation using KA first.

idx > length(a) && return
@kernel rand!(a, randstate)
idx = @index(Global, Linear)
@inbounds a[idx] = gpu_rand(T, ctx, randstates)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the only way people will be using gpu_rand()? Or will they be calling the functions on lines {33, 40, 58...}?

If so, we can just pass idx as threadid into the above functions, right?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only supported API are the Random stdlib functions; calling gpu_rand explicitly is not supported, so feel free to refactor.

@maleadt
Copy link
Member

maleadt commented Feb 14, 2024

Can we also just remove indexing.jl and synchronization.jl for KA's utilities?

Ideally, yes, it would be nice if we can remove all of the device functionality.

@leios
Copy link
Contributor

leios commented Feb 14, 2024

Great! I'm working on this for like an hour or two a day, so expect a PR next week? #517 is kinda in the right direction, but I have another branch that is rebased up to master so I can test ROC / CuArrays at least.

@christiangnrd
Copy link
Member

Can this be closed?

@maleadt maleadt closed this Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants